//package com.lt.test.consumer.controller;
//
//import com.alibaba.dubbo.config.annotation.Reference;
//import com.lt.test.api.CheckingService;
//import com.lt.test.api.SPLOrderService;
//import com.lt.test.common.constant.HttpRequestConstant;
//import com.lt.test.common.util.CustomUtil;
//import com.lt.test.common.util.ExcelUtil;
//import com.lt.test.common.util.StringUtils;
//import com.lt.test.entity.DTO.*;
//import com.lt.test.entity.QueryModel.CheckingQueryModel;
//import com.lt.test.entity.QueryModel.MapQueryModel;
//import com.lt.test.consumer.util.WebUtils;
//import org.apache.poi.hssf.usermodel.HSSFWorkbook;
//import org.apache.shiro.SecurityUtils;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
//import org.apache.shiro.subject.Subject;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.servlet.ModelAndView;
//
//import javax.annotation.Resource;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.OutputStream;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
///**
// * Created by zhengchuan on 2017/4/21.
// */
//@Controller
//@RequestMapping("/checking")
//public class CheckingController {
//    private static final Logger logger = LoggerFactory.getLogger(CheckingController.class);
//
//    @Reference(version = "1.0.0")
//    private CheckingService checkingService;
//    @Reference(version = "1.0.0")
//    private SPLOrderService sPLOrderService;
//
//    /**
//     * 跳转到总账查询页面
//     *
//     * @return
//     */
//    @RequestMapping("/generalLedgerPage")
//    public ModelAndView generalLedgerPage() {
//    	ModelAndView mav = new ModelAndView();
//    	Subject subject = SecurityUtils.getSubject();
//        //身份
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//    	mav.addObject("username", activeUser.getUsername());
//    	mav.setViewName("content/checking/generalLedgerPage");
//        return mav;
//    }
//
//    /**
//     * 总账查询数据接口getGeneralLedgerByPageQuery
//     * @throws Exception
//     */
//    @RequestMapping("/getGeneralLedgerByPageQuery")
//    public @ResponseBody
//    PageDTO<GeneralLedgerDTO> getGeneralLedgerByPageQuery(CheckingQueryModel checkingQueryModel) throws Exception{
//        //主体
//        Subject subject = SecurityUtils.getSubject();
//        //身份
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//        checkingQueryModel.setUserId(activeUser.getUserId());
//        PageDTO<GeneralLedgerDTO> result = checkingService.getGeneralLedgerByPageQuery(checkingQueryModel);
//        return result;
//    }
//    /**
//     * 获取总账查询条件
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getTbcocompNamesAndBankNamesAndMerNames")
//    public @ResponseBody
//    ResponseDTO getTbcocompNamesAndBankNamesAndMerNames( ) throws Exception{
//        ResponseDTO responseDTO = new ResponseDTO();
//        //主体
//        Subject subject = SecurityUtils.getSubject();
//        //身份
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//
//        System.out.println("====== 获取总账查询条件======>"+activeUser.getUserId());
//       Map<String,Object> data =  checkingService.getTbcocompNamesAndBankNamesAndMerNames(activeUser.getUserId());
//        responseDTO.setSuccess(true);
//        responseDTO.setData(data);
//        return responseDTO;
//    }
//
//    /**
//     * 跳转到明细查询页面
//     *
//     * @return
//     */
//    @RequestMapping("/checkingDetailPage")
//    public String checkingDetailPage(HttpServletRequest request) {
//        String jsonData = request.getParameter("rowData");
//        request.setAttribute("rowData",jsonData);
//        return "content/checking/checkingDetail";
//    }
//
//    /**
//     * 明细查询数据接口
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getCheckingDetailByPageQuery")
//    public @ResponseBody
//    PageDTO<CheckingDetailDTO> getCheckingDetailByPageQuery(CheckingQueryModel checkingQueryModel) throws Exception{
//        //主体
//        Subject subject = SecurityUtils.getSubject();
//        //身份
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//        checkingQueryModel.setUserId(activeUser.getUserId());
//        PageDTO<CheckingDetailDTO> result = checkingService.getCheckingDetailByPageQuery(checkingQueryModel);
//        return result;
//    }
//
//    /**
//     * 导出到excel
//     * @param request
//     * @param response
//     * @throws Exception
//     */
//    @RequestMapping("/exportExcel")
//    public void exportExcel(HttpServletRequest request, HttpServletResponse response,CheckingQueryModel checkingQueryModel) throws Exception {
//        logger.info("开始生成excel表格");
//        String tableType = request.getParameter("tableType");
//        //主体
//        Subject subject = SecurityUtils.getSubject();
//        //身份
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//        checkingQueryModel.setUserId(activeUser.getUserId());
//        Map<String, Object> map = new HashMap<>();
//        logger.info("tableType is : "+ tableType);
//        String[] Keys = new String[0];
//        String[] columnNames = new String[0];
//        List<Map<String, Object>> shipmentOrderList = null;
//        String sheetNameTitle = "";
//        switch (tableType) {
//            case "general" :
//                sheetNameTitle = "总账列表";
//                shipmentOrderList = checkingService.getGeneralLedgerToExportExcel(checkingQueryModel);
//                if(subject.isPermitted("CHECKING:TBCOCOMPF")){
//                    Keys = new String[]{"tbcocompId","tbcocompName","bankCode","bankName","merId","settleDate","payTypeName","payAmt","tbcocompFinalAmt","payNum"};
//                    columnNames = new String[]{"烟草公司标识","烟草公司名称","收单行代码","收单行名称","商户号","清算日期","交易类型","支付金额","烟草结算金额","支付笔数"};
//                }
//                if(subject.isPermitted("CHECKING:BANK")){
//                    Keys = new String[]{"bankCode","bankName","merId","merName","settleDate","payAmt","payNum","bankFinalAmt","factorage","servicePrice","adapterAmt"};
//                    columnNames = new String[]{"收单行代码","收单行名称","商户号","商户号名称","清算日期","支付金额","支付笔数","银行结算金额","手续费","品牌服务费","转接清算费"};
//                }
//                if (subject.isPermittedAll("CHECKING:TBCOCOMPF","CHECKING:BANK")){
//                    Keys = new String[]{"tbcocompId","tbcocompName","bankCode","bankName","merId","merName","settleDate","payTypeName","payAmt","tbcocompFinalAmt","payNum","bankFinalAmt","factorage","servicePrice","adapterAmt"};
//                    columnNames = new String[]{"烟草公司标识","烟草公司名称","收单行代码","收单行名称","商户号","商户号名称","清算日期","交易类型","支付金额","烟草结算金额","支付笔数","银行结算金额","手续费","品牌服务费","转接清算费"};
//                }
//
//                break;
//            case "detail" :
//                sheetNameTitle = "明细列表";
//                shipmentOrderList = checkingService.getDetailToExportExcel(checkingQueryModel);
//                if(subject.isPermitted("CHECKING:BANK")){
//                    Keys = new String[]{"bankCode","bankName","merId","merName","settleDate","payTypeName","orderId","payAmt","payDate","respCode","respMsg","customerId","customerName"};
//                    columnNames = new String[]{"收单行代码","收单行名称","商户号","商户号名称","清算日期","交易类型","订单号","支付金额","支付日期","返回代码","返回描述","专卖证号","客户名称"};
//                }
//                if(subject.isPermitted("CHECKING:TBCOCOMPF")){
//                    Keys = new String[]{"tbcocompId","tbcocompName","bankCode","bankName","merId","merName","settleDate","payTypeName","orderId","payAmt","payDate","respCode","respMsg","customerId","customerName"};
//                    columnNames = new String[]{"烟草公司标识","烟草公司名称","收单行代码","收单行名称","商户号","商户号名称","清算日期","交易类型","订单号","支付金额","支付日期","返回代码","返回描述","专卖证号","客户名称"};
//                }
//                break;
//            default:
//                break;
//        }
//
//        StringBuffer stringBuffer = new StringBuffer();
//        stringBuffer.append(sheetNameTitle);
//        if (checkingQueryModel.getTbcocompName() != null && !checkingQueryModel.getTbcocompName().equals("")){
//            stringBuffer.append("-" + checkingQueryModel.getTbcocompName());
//        }
//        if (checkingQueryModel.getBankName() != null && !checkingQueryModel.getBankName().equals("")){
//            stringBuffer.append("-" + checkingQueryModel.getBankName());
//        }
//        if (checkingQueryModel.getMerName() != null && !checkingQueryModel.getMerName().equals("")){
//            stringBuffer.append("-" + checkingQueryModel.getMerName());
//        }
//        if (checkingQueryModel.getSettleDate() != null && !checkingQueryModel.getSettleDate().equals("")){
//            stringBuffer.append("-" + checkingQueryModel.getSettleDate());
//        }
//        if (checkingQueryModel.getPayType().equals("0")){
//            stringBuffer.append("-支付");
//        }
//        if (checkingQueryModel.getPayType().equals("1")){
//            stringBuffer.append("-退货");
//        }
//        String fileName = stringBuffer.toString();
//        map.put("sheetName", stringBuffer.toString());
//        logger.info("添加sheetName的Map");
//        shipmentOrderList.add(0,map);
//        logger.info("开始执行ExcelUtil.createHSSFWorkbook方法");
//        HSSFWorkbook wb = ExcelUtil.createHSSFWorkbook(shipmentOrderList, Keys, columnNames);
//        logger.info("执行ExcelUtil.createHSSFWorkbook方法完毕");
//        OutputStream out = response.getOutputStream();
//        response.reset();
//        response.setHeader("Content-Disposition", "attachment;filename="+ new String((fileName + ".xls").getBytes(), "iso-8859-1"));
//        response.setContentType("application/msexcel;charset=UTF-8");
//        logger.info("设置响应信息完成");
//        //输出excel文件
//        wb.write(out);
//        out.close();
//        logger.info("结束生成excel表格");
//    }
//
//    /**
//     * 卷烟消费导出到excel
//     * @param request
//     * @param response
//     * @throws Exception
//     */
//    @RequestMapping("/smokeCustomerListExportExcel")
//    public void smokeCustomerListExportExcel(HttpServletRequest request, HttpServletResponse response,MapQueryModel params) throws Exception {
//        logger.info("开始生成excel表格");
//        params.getStringMap().put("fiveChannelCode", CustomUtil.getChannelCodePreFive(params.getStringMap().get("cityName")));
//        WebUtils.managerStringMap(params.getStringMap());
//
//        Map<String, Object> map = new HashMap<>();
//        String[] Keys = new String[0];
//        String[] columnNames = new String[0];
//        List<Map<String, Object>> smokeCustomerList = null;
//        String sheetNameTitle = "";
//        switch (params.getStringMap().get("tableType")) {
//            case "smokeCustomerList" :
//                sheetNameTitle = "卷烟消费行为记录";
//                smokeCustomerList = checkingService.getSmokeCustomerByQuery(params.getStringMap());
//                    Keys = new String[]{"IDCAR","BANKCAR","PHONE","SEX","AGE","USERADDRESS","OPERATORTIME","WEEKDAYSTR","SUMQUANTITY","SUMPRICE","PRODUCTNAME","COUNTORDERID","SHOPADDRESS","SHOPDISTRIBUTE","SMOKECHANGE"};
//                    columnNames = new String[]{"身份证","卡号","电话","性别","年龄","住址","时间","星期","消费数量","消费金额","消费品规","购买次数","购买地点","商店业态分布","卷烟变化情况"};
//                break;
//            default:
//                break;
//        }
//
//        /*StringBuffer stringBuffer = new StringBuffer();
//        stringBuffer.append(sheetNameTitle);
//        if (operatorTime != null && !operatorTime.equals("")){
//            stringBuffer.append("-" + operatorTime);
//        }*/
//        String fileName = sheetNameTitle;
//        map.put("sheetName", sheetNameTitle);
//        logger.info("添加sheetName的Map");
//        smokeCustomerList.add(0,map);
//        logger.info("开始执行ExcelUtil.createHSSFWorkbook方法");
//        HSSFWorkbook wb = ExcelUtil.createHSSFWorkbook(smokeCustomerList, Keys, columnNames);
//        logger.info("执行ExcelUtil.createHSSFWorkbook方法完毕");
//        OutputStream out = response.getOutputStream();
//        response.reset();
//        response.setHeader("Content-Disposition", "attachment;filename="+ new String((fileName + ".xls").getBytes(), "iso-8859-1"));
//        response.setContentType("application/msexcel;charset=UTF-8");
//        logger.info("设置响应信息完成");
//        //输出excel文件
//        wb.write(out);
//        out.close();
//        logger.info("结束生成excel表格");
//    }
//
//
//
//    /**
//     * 查询所有客户经理名称用来做查询
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/selectEmpNameToSelected")
//    public @ResponseBody
//    ResponseDTO selectEmpNameToSelected(String channelName) throws Exception{
//        Subject subject = SecurityUtils.getSubject();
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//        Map<String, String> params = new HashMap<>(3);
//
//        params.put("fiveChannelCode", CustomUtil.getChannelCodePreFive(activeUser.getChannelName()));
//        params.put("quXianName",activeUser.getQuXianName());
//
//        if (!StringUtils.isNullOrTrimEmpty(activeUser.getRealChannelName())) {
//            channelName = activeUser.getRealChannelName();
//        }
//
//        params.put("realChannelName", channelName);
//
//        List<Map<String,Object>> result = checkingService.selectEmpNameToSelected(params);
//        ResponseDTO responseDTO = new ResponseDTO();
//        responseDTO.setData(result);
//        responseDTO.setSuccess(true);
//        responseDTO.setMessage("查询成功");
//        return responseDTO;
//    }
//
//    /**
//     * 查询所有机构名称用来做查询
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/selectChannelNameToSelected")
//    public @ResponseBody
//    ResponseDTO selectChannelNameToSelected(String quXianName) throws Exception{
//        Subject subject = SecurityUtils.getSubject();
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//        Map<String, String> params = new HashMap<>(3);
//        params.put("channelName",activeUser.getChannelName());
//        params.put("userId",activeUser.getUserId());
//
//        if (activeUser.getQuXianName() !=null && !"".equals(activeUser.getQuXianName())) {
//            quXianName = activeUser.getQuXianName();
//        }
//
//        if (quXianName != null && !quXianName.equals("")) {
//            String channelId = sPLOrderService.getIdByChannleName(quXianName);
//            params.put("parentChannelId", channelId == null ? "-99999" : channelId);
//        }
//
//        List<Map<String,Object>> result = checkingService.selectChannelNameToSelected(params);
//        ResponseDTO responseDTO = new ResponseDTO();
//        responseDTO.setData(result);
//        responseDTO.setSuccess(true);
//        responseDTO.setMessage("查询成功");
//        return responseDTO;
//    }
//
//    /**
//     * 查询所有工业公司
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/selectMaterialCompanyToSelected")
//    public @ResponseBody
//    ResponseDTO selectMaterialCompanyToSelected(String quXianName) throws Exception{
//
//        List<Map<String,Object>> result = checkingService.selectMaterialCompanyToSelected();
//        ResponseDTO responseDTO = new ResponseDTO();
//        responseDTO.setData(result);
//        responseDTO.setSuccess(true);
//        responseDTO.setMessage("查询成功");
//        return responseDTO;
//    }
//
//    /**
//     * 查询所有区县名称用来做查询
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/selectQuXianNameToSelected")
//    public @ResponseBody
//    ResponseDTO selectQuXianNameToSelected(HttpServletRequest request) throws Exception{
//        Subject subject = SecurityUtils.getSubject();
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//        String cityName = request.getParameter("cityName");
//
//        if (StringUtils.isNot_NullOrTrimEmpty(activeUser.getChannelName())) {
//            cityName = activeUser.getChannelName();
//        }
//        Map<String, String> params = new HashMap<>(2, 1.0F);
//        params.put("channelName", cityName);
//        params.put("quXianName", activeUser.getQuXianName());
//        List<Map<String,Object>> result = checkingService.selectQuXianNameToSelected(params);
//        ResponseDTO responseDTO = new ResponseDTO();
//        responseDTO.setData(result);
//        responseDTO.setSuccess(true);
//        responseDTO.setMessage("查询成功");
//        return responseDTO;
//    }
//
//    /**
//     * 查询档位名称名称用来做查询
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/selectOrderLevelToSelected")
//    public @ResponseBody
//    ResponseDTO selectOrderLevelToSelected() throws Exception{
//        List<Map<String,Object>> result = checkingService.selectOrderLevelToSelected();
//        ResponseDTO responseDTO = new ResponseDTO();
//        responseDTO.setData(result);
//        responseDTO.setSuccess(true);
//        responseDTO.setMessage("查询成功");
//        return responseDTO;
//    }
//
//    /**
//     * 查询液态分布用来做查询
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/selectBaseTypeNameToSelected")
//    public @ResponseBody
//    ResponseDTO selectBaseTypeNameToSelected() throws Exception{
//        List<Map<String,Object>> result = checkingService.selectBaseTypeNameToSelected();
//        ResponseDTO responseDTO = new ResponseDTO();
//        responseDTO.setData(result);
//        responseDTO.setSuccess(true);
//        responseDTO.setMessage("查询成功");
//        return responseDTO;
//    }
//
//    /**
//     * 查询经营类型名称用来做查询
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/selectCityTypeToSelected")
//    public @ResponseBody
//    ResponseDTO selectCityTypeToSelected() throws Exception{
//        List<Map<String,Object>> result = checkingService.selectCityTypeToSelected();
//        ResponseDTO responseDTO = new ResponseDTO();
//        responseDTO.setData(result);
//        responseDTO.setSuccess(true);
//        responseDTO.setMessage("查询成功");
//        return responseDTO;
//    }
//
//    /**
//     * 查询所有客户经理名称用来添加客户经理
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping(value = "/getEmpInfoToSelected", produces = "application/json; charset=utf-8")
//    public @ResponseBody
//    String getEmpInfoToSelected() throws Exception{
//        List<Map<String,Object>> result = checkingService.selectEmpNameToSelected(new HashMap<String, String>(1));
//        StringBuilder builder = new StringBuilder();
//        builder.append("<select>");
//        builder.append("<option value=''>——不选择客户经理——</option>");
//        for (Map<String,Object> emp : result) {
//            builder.append("<option value='" + emp.get("value").toString() + "'>" + emp.get("value").toString() + "</option>");
//        }
//        builder.append("</select>");
//        return builder.toString();
//    }
//
//    /**
//     * 查询所有区县名称，用来添加区县
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping(value = "/getQuXianNameInfoToSelected", produces = "application/json; charset=utf-8")
//    public @ResponseBody
//    String getQuXianNameInfoToSelected() throws Exception{
//        Subject subject = SecurityUtils.getSubject();
//        ActiveUser activeUser = (ActiveUser) subject.getPrincipal();
//
//        Map<String, String> params = new HashMap<>(2, 1.0F);
//        params.put("channelName", activeUser.getChannelName());
//        params.put("quXianName", activeUser.getQuXianName());
//
//        List<Map<String,Object>> result = checkingService.selectQuXianNameToSelected(params);
//        StringBuilder builder = new StringBuilder();
//        builder.append("<select>");
//        builder.append("<option value=''>——不选择所属区县——</option>");
//        for (Map<String,Object> emp : result) {
//            builder.append("<option value='" + emp.get("value").toString() + "'>" + emp.get("value").toString() + "</option>");
//        }
//        builder.append("</select>");
//        return builder.toString();
//    }
//
//    /**
//     * 跳转到卷烟消费记录列表页面
//     *
//     * @return
//     */
//    @RequiresPermissions("SOMKER_CUSTOMER:LIST")
//    @RequestMapping("/toSmokeCustomerPage")
//    public String toSmokeCustomerPage(HttpServletRequest request) {
//        System.out.println("======> mobile <============ ");
//        String mobile = request.getParameter("mobile") == null ? "" : request.getParameter("mobile").toString();
//        System.out.println("======> mobile : " + mobile);
//        request.setAttribute("mobile",mobile);
//        return "content/smokecustomer/list";
//    }
//    /**
//     * 跳转到卷烟消费记录列表页面 --合计
//     *
//     * @return
//     */
//    @RequiresPermissions("SOMKER_CUSTOMER:LIST")
//    @RequestMapping("/toSmokeCustomerStatisticsListPage")
//    public String toSmokeCustomerStatisticsListPage() {
//        return "content/smokecustomer/liststatistics";
//    }
//
//    /**
//     * 烟草客户的定位，地图展示
//     *
//     * @return
//     */
//    //@RequiresPermissions("SOMKER_CUSTOMER:LIST")
//    @RequestMapping("/toCustomerLocationPage")
//    public String toCustomerLocationPage() {
//        return "content/smokecustomer/customerlocation";
//    }
//
//    /**
//     * 烟草客户的定位，地图展示
//     *
//     * @return
//     */
//    //@RequiresPermissions("SOMKER_CUSTOMER:LIST")
//    @RequestMapping("/toCustomerLocationPagess")
//    public String toCustomerLocationPagess() {
//        return "content/smokecustomer/customerlocationss";
//    }
//
//    /**
//     * 烟草客户的定位，地图展示
//     *
//     * @return
//     */
//    //@RequiresPermissions("SOMKER_CUSTOMER:LIST")
//    @RequestMapping("/toCarLocationPage")
//    public String toCarLocationPage() {
//        return "content/smokecustomer/carlocation";
//    }
//    /**
//     * 跳转到卷烟消费记录列表页面
//     *
//     * @return
//     */
//    @RequiresPermissions("SOMKER_CUSTOMER:STATISTICS")
//    @RequestMapping("/toSmokeCustomerStatistics")
//    public String toSmokeCustomerStatistics() {
//        return "content/smokecustomer/statistics";
//    }
//    /**
//     * 跳转到卷烟消费--消费者统计
//     *
//     * @return
//     */
//   // @RequiresPermissions("SOMKER_CUSTOMER:STATISTICS")
//    @RequestMapping("/toCustomerSmokeStatistics")
//    public String toCustomerSmokeStatistics() {
//        return "content/smokecustomer/customer-statistics";
//    }
//    /**
//     * 跳转到卷烟消费-- 销量库存统计
//     *
//     * @return
//     */
//   // @RequiresPermissions("SOMKER_CUSTOMER:STATISTICS")
//    @RequestMapping("/toStockSaleStatistics")
//    public String toStockSaleStatistics() {
//        return "content/smokecustomer/stocksale-statistics";
//    }
//
//    /**
//     * 分页查询卷烟消费行为记录数据接口
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getSmokeCustomerByPageQuery")
//    public @ResponseBody
//    PageDTO<SmokeCustomerListDTO> getSmokeCustomerByPageQuery(MapQueryModel mapQueryModel) throws Exception{
//        mapQueryModel.getStringMap().put("fiveChannelCode", CustomUtil.getChannelCodePreFive(mapQueryModel.getStringMap().get("cityName")));
//        WebUtils.managerStringMap(mapQueryModel.getStringMap());
//        PageDTO<SmokeCustomerListDTO> result = checkingService.getSmokeCustomerByPageQuery(mapQueryModel.getStringMap());
//        return result;
//    }
//    /**
//     * 分页查询卷烟消费行为记录数据接口--合计的
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getSmokeCustomerStatisticsListByPageQuery")
//    public @ResponseBody
//    PageDTO<Map<String,String>> getSmokeCustomerStatisticsListByPageQuery(MapQueryModel mapQueryModel) throws Exception{
//        mapQueryModel.getStringMap().put("fiveChannelCode", CustomUtil.getChannelCodePreFive(mapQueryModel.getStringMap().get("cityName")));
//        WebUtils.managerStringMap(mapQueryModel.getStringMap());
//        PageDTO<Map<String,String>> result = checkingService.getSmokeCustomerStatisticsListByPageQuery(mapQueryModel.getStringMap());
//        return result;
//    }
//
//
//    /**
//     * 客户店铺地图
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getCustomerShop")
//    public @ResponseBody
//    ResponseDTO getCustomerShop(MapQueryModel mapQueryModel) throws Exception{
//        ResponseDTO responseDTO = new ResponseDTO();
//        mapQueryModel.getStringMap().put("fiveChannelCode", CustomUtil.getChannelCodePreFive(mapQueryModel.getStringMap().get("cityName")));
//        WebUtils.managerStringMap(mapQueryModel.getStringMap());
//        List<Map<String, Object>> data = checkingService.getCustomerShop(mapQueryModel.getStringMap());
//        System.out.println("==========>"+data);
//        responseDTO.setCode(HttpRequestConstant.REQUEST_SUCCESS_CODE);
//        responseDTO.setMessage("获取成功");
//        responseDTO.setSuccess(true);
//        responseDTO.setData(data);
//        return responseDTO;
//    }
//    /**
//     * 物流配送车辆位置
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getCarLastLocation")
//    public @ResponseBody
//    ResponseDTO getCarLastLocation(MapQueryModel mapQueryModel) throws Exception{
//        ResponseDTO responseDTO = new ResponseDTO();
//      //  mapQueryModel.getStringMap().put("fiveChannelCode", CustomUtil.getChannelCodePreFive(mapQueryModel.getStringMap().get("cityName")));
//       // WebUtils.managerStringMap(mapQueryModel.getStringMap());
//
//        List<Map<String, Object>> data = checkingService.getCarLastLocation(mapQueryModel.getStringMap());
//        responseDTO.setCode(HttpRequestConstant.REQUEST_SUCCESS_CODE);
//        responseDTO.setMessage("获取成功");
//        responseDTO.setSuccess(true);
//        responseDTO.setData(data);
//        return responseDTO;
//    }
//
//    /**
//     * 卷烟消费行为统计数据接口
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getSmokeCustomerStatistics")
//    public @ResponseBody
//    ResponseDTO getSmokeCustomerStatistics(MapQueryModel mapQueryModel) throws Exception{
//        ResponseDTO responseDTO = new ResponseDTO();
//        mapQueryModel.getStringMap().put("fiveChannelCode", CustomUtil.getChannelCodePreFive(mapQueryModel.getStringMap().get("cityName")));
//        WebUtils.managerStringMap(mapQueryModel.getStringMap());
//        Map<String, Object> data = new HashMap<>(8, 1.0F);
//        List<Map<String, Object>> main1Data = checkingService.getMain1Data(mapQueryModel.getStringMap());
//        List<Map<String, Object>> main2Data = checkingService.getMain2Data(mapQueryModel.getStringMap());
//        List<Map<String, Object>> main3Data = checkingService.getMain3Data(mapQueryModel.getStringMap());
//        List<Map<String, Object>> main4Data = checkingService.getMain4Data(mapQueryModel.getStringMap());
//
//        List<Map<String, Object>> main5Data = checkingService.getMain5Data(mapQueryModel.getStringMap());
//
//        List<Map<String, Object>> main7Data = checkingService.getMain7Data(mapQueryModel.getStringMap());
//        List<Map<String, Object>> main6Data = checkingService.getMain6Data(mapQueryModel.getStringMap());
//
//        data.put("main1Data", main1Data);
//        data.put("main2Data", main2Data);
//        data.put("main3Data", main3Data);
//        data.put("main4Data", main4Data);
//        data.put("main5Data", main5Data);
//        data.put("main7Data", main7Data);
//        data.put("main6Data", main6Data);
//
//        responseDTO.setCode(HttpRequestConstant.REQUEST_SUCCESS_CODE);
//        responseDTO.setMessage("获取成功");
//        responseDTO.setSuccess(true);
//        responseDTO.setData(data);
//        return responseDTO;
//    }
//
//    /**
//     * 针对烟证号的一些统计
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getCustomerSmokeStatistics")
//    public @ResponseBody
//    ResponseDTO getCustomerSmokeStatistics(MapQueryModel mapQueryModel) throws Exception{
//        ResponseDTO responseDTO = new ResponseDTO();
//        mapQueryModel.getStringMap().put("fiveChannelCode", CustomUtil.getChannelCodePreFive(mapQueryModel.getStringMap().get("cityName")));
//        WebUtils.managerStringMap(mapQueryModel.getStringMap());
//
//        Map<String, Object> data = new HashMap<>(6, 1.0F);
//
//        List<Map<String, Object>> main1Data = checkingService.getCustomerMain1Data(mapQueryModel.getStringMap());
//        List<Map<String, Object>> main2Data = checkingService.getCustomerMain2Data(mapQueryModel.getStringMap());
//        List<Map<String, Object>> main3Data = checkingService.getCustomerMain3Data(mapQueryModel.getStringMap());
//        List<Map<String, Object>> main4Data = checkingService.getCustomerMain4Data(mapQueryModel.getStringMap());
//
//        List<Map<String, Object>> main5Data = checkingService.getCustomerMain5Data(mapQueryModel.getStringMap());
//
//        List<Map<String, Object>> main6Data = checkingService.getCustomerMain6Data(mapQueryModel.getStringMap());
//
//        String registerNum = checkingService.getCustomerRegisterNum(mapQueryModel.getStringMap());
//        String dayOrderNum = checkingService.getCustomerDayOrderNum(mapQueryModel.getStringMap());
//
//        data.put("main1Data", main1Data);
//        data.put("main2Data", main2Data);
//        data.put("main3Data", main3Data);
//        data.put("main4Data", main4Data);
//        data.put("main5Data", main5Data);
//        data.put("main6Data", main6Data);
//        data.put("registerNum", registerNum);
//        data.put("dayOrderNum", dayOrderNum);
//
//        responseDTO.setCode(HttpRequestConstant.REQUEST_SUCCESS_CODE);
//        responseDTO.setMessage("获取成功");
//        responseDTO.setSuccess(true);
//        responseDTO.setData(data);
//        return responseDTO;
//    }
//
//    /**
//     *
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping("/getBuyShopInfoByPhone")
//    public @ResponseBody
//    ResponseDTO getBuyShopInfoByPhone(String phone) throws Exception{
//        ResponseDTO responseDTO = new ResponseDTO();
//        List<Map<String,String>> data = checkingService.getBuyShopInfoByPhone(phone);
//        responseDTO.setCode(HttpRequestConstant.REQUEST_SUCCESS_CODE);
//        responseDTO.setMessage("获取成功");
//        responseDTO.setSuccess(true);
//        responseDTO.setData(data);
//        return responseDTO;
//    }
//
//}
